﻿<fluent:RibbonWindow x:Class="XSemmel.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:prettyPrinter="clr-namespace:XSemmel.PrettyPrinter"
        xmlns:commands="clr-namespace:XSemmel.Commands" 
        xmlns:treeViewRibbon="clr-namespace:XSemmel.TreeView.Ribbon" 
        xmlns:XSemmel="clr-namespace:XSemmel" 
        xmlns:Ribbon="clr-namespace:XSemmel.Schema.Ribbon" 
        xmlns:Ribbon1="clr-namespace:XSemmel.Xslt.Ribbon" 
        xmlns:fluent="clr-namespace:Fluent;assembly=Fluent"
        mc:Ignorable="d" 
        Title="Xsemmel" MinHeight="380" MinWidth="640"
        d:DesignHeight="391" d:DesignWidth="999"
        TextOptions.TextFormattingMode="Display"        
        Icon="/XSemmel;component/AppIcon.ico" SizeToContent="Manual"
        Closed="RibbonWindow_Closed"
        Loaded="MainWindow_OnLoaded" >
    <DockPanel>
        <DockPanel.Resources>
            <prettyPrinter:PrettyPrintCommand x:Key="PrettyPrintCommand"/>
            <commands:TrimXmlCommand x:Key="TrimXmlCommand"/>
            <commands:SaveCommand x:Key="SaveCommand"/>
            <commands:OpenCommand x:Key="OpenCommand"/>
            <commands:CopyFilenameCommand x:Key="CopyFilenameCommand"/>
            <commands:Xsd2XmlGeneratorCommand x:Key="Xsd2XmlGeneratorCommand"/>
            <commands:InsertCurrentDateTimeCommand x:Key="InsertCurrentDateTimeCommand"/>
            <commands:XsdVizFontPlusCommand x:Key="XsdVizFontPlusCommand"/>
            <commands:XsdVizFontMinusCommand x:Key="XsdVizFontMinusCommand"/>
            <commands:XsdVizShowRootCommand x:Key="XsdVizShowRootCommand"/>
            <commands:XsdVizHistoryBackCommand x:Key="XsdVizHistoryBackCommand"/>
            <commands:XsdVizUnhideAllCommand x:Key="XsdVizUnhideAllCommand"/>
            <commands:XsdVizCopyToClipboardCommand x:Key="XsdVizCopyToClipboardCommand"/>
            <commands:XsdVizExportCommand x:Key="XsdVizExportCommand"/>
            <commands:StartXQueryCommand x:Key="StartXQueryCommand"/>
            <commands:UnescapeCsStringCommand x:Key="UnescapeCsStringCommand"/>
            <commands:UnescapeXmlStringCommand x:Key="UnescapeXmlStringCommand"/>
            <commands:UnescapeBase64StringCommand x:Key="UnescapeBase64StringCommand"/>
            <commands:EscapeXmlStringCommand x:Key="EscapeXmlStringCommand"/>
            <commands:Dec2HexCommand x:Key="Dec2HexCommand"/>
            <commands:Hex2DecCommand x:Key="Hex2DecCommand"/>
            <commands:EscapeBase64StringCommand x:Key="EscapeBase64StringCommand"/>
            <commands:ToggleSearchAndReplaceCommand x:Key="ToggleSearchAndReplaceCommand"/>
            <commands:StartSearchCommand x:Key="StartSearchCommand"/>
            <commands:ExportAsHtmlCommand x:Key="ExportAsHtmlCommand"/>
            <commands:OpenFromClipboardCommand x:Key="OpenFromClipboardCommand"/>
            <commands:XsdVizEnabledCommand x:Key="XsdVizEnabledCommand"/>
            <commands:XsdValidateXmlCommand x:Key="XsdValidateXmlCommand"/>
            <commands:CommentCommand x:Key="CommentCommand"/>
            <commands:UncommentCommand x:Key="UncommentCommand"/>
        </DockPanel.Resources>

        <fluent:Ribbon x:Name="Ribbon" DockPanel.Dock="Top" AutomaticStateManagement="False">
            <fluent:Ribbon.QuickAccessItems>
                <fluent:QuickAccessMenuItem Icon="/Images/Folder_Open_16x16.png"
                    ToolTip="Open"
                    Header="Open"
                    IsChecked="True"
                    Command="{StaticResource OpenCommand}"
                    CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                />
                <fluent:QuickAccessMenuItem
                    Icon="/Images/OpenFromClipboard_16x16.png"
                    ToolTip="Open from clipboard"
                    Header="Open from clipboard"
                    IsChecked="True"
                    Command="{StaticResource OpenFromClipboardCommand}"
                    CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                />
                <fluent:QuickAccessMenuItem 
                    Icon="/Images/Save.png" 
                    Header="Save file"
                    ToolTip="Save file"
                    IsChecked="True"
                    Command="{StaticResource SaveCommand}"
                    CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                />
            </fluent:Ribbon.QuickAccessItems>

            <fluent:Ribbon.Menu>
                <XSemmel:ApplicationMenu />
            </fluent:Ribbon.Menu>
            
            <fluent:RibbonTabItem Header="Editor">
                <fluent:RibbonGroupBox Header="Clipboard">
                    <fluent:Button Header="Paste" LargeIcon="/Images/Paste.png" Command="Paste"/>
                    <fluent:Button Header="Cut" Icon="/Images/Cut.png" SizeDefinition="Middle, Small" Command="Cut"/>
                    <fluent:Button Header="Copy" Icon="/Images/Copy.png" SizeDefinition="Middle, Small" Command="Copy"/>
                    <fluent:Button 
                        Header="Copy file path" 
                        Icon="/Images/CopyFolderHS.png" 
                        SizeDefinition="Middle, Small"
                        ToolTip="Copy name of open document to clipboard"
                        Command="{StaticResource CopyFilenameCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"/>
                </fluent:RibbonGroupBox>
                <fluent:RibbonGroupBox Header="Editing">
                    <fluent:Button
                        Header="Search"
                        Icon="/Images/Binoculars_16x16.png"
                        Command="{StaticResource StartSearchCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                        SizeDefinition="Middle, Small"
                        ToolTip="Starts the text search (Ctrl+F)"/>
                    <fluent:ToggleButton
                        Header="Search'n'Replace"
                        Icon="/Images/SearchReplace_16x16.png"
                        Command="{StaticResource ToggleSearchAndReplaceCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                        IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data.ShowFindDialog}"
                        SizeDefinition="Middle, Small"/>
                    <fluent:Button Header="Select all" Icon="/Images/SelectAll.png" Command="SelectAll" SizeDefinition="Middle, Small"/>
                    <fluent:Button Header="Delete" Icon="/Images/Delete_16x16.png" Command="Delete" SizeDefinition="Middle, Small"/>
                    <fluent:Button Header="Undo" Icon="/Images/Undo.png" Command="Undo" SizeDefinition="Middle, Small"/>
                    <fluent:Button Header="Redo" Icon="/Images/Redo.png" Command="Redo" SizeDefinition="Middle, Small"/>

                    <fluent:ToggleButton
                        Header="Comment"
                        Icon="/Images/XmlComment_16x16.png"
                        Command="{StaticResource CommentCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                        IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data.ShowFindDialog}"
                        SizeDefinition="Middle, Small"/>
                    <fluent:ToggleButton
                        Header="Uncomment"
                        Icon="/Images/XmlUncomment_16x16.png"
                        Command="{StaticResource UncommentCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                        IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data.ShowFindDialog}"
                        SizeDefinition="Middle, Small"/>                    
                    
                </fluent:RibbonGroupBox>
                <fluent:RibbonGroupBox Header="Show">
                    <fluent:CheckBox
                        Header="WordWrap"
                        ToolTip="WordWrap"
                        IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data.WordWrap}" 
                    />
                    <fluent:CheckBox
                        Header="Special chars"
                        ToolTip="Show special charaters"
                        IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data.ShowSpecialCharacters}" 
                    />
                </fluent:RibbonGroupBox>
                <fluent:RibbonGroupBox Header="Text">
                    <fluent:SplitButton Header="PrettyPrint" 
                        Icon="/Images/Prettyprint_16x16.png" 
                        LargeIcon="/Images/Prettyprint_32x32.png" 
                        Command="{StaticResource PrettyPrintCommand}" 
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}">
                        <fluent:SplitButton.Items>
                            <fluent:MenuItem Header="Indent"
                                    IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data.PrettyPrintData.Indent}" 
                                    IsCheckable="True"
                                    Command="{StaticResource PrettyPrintCommand}" 
                                    CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"/>
                            <fluent:MenuItem Header="New lines on attributes"
                                    IsCheckable="True"
                                    IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data.PrettyPrintData.NewLineOnAttributes}"
                                    Command="{StaticResource PrettyPrintCommand}" 
                                    CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"/>

                            <Separator/>
                            <fluent:MenuItem Header="Trim"
                                             ToolTip="Trims and prettyprints invalid XML"
                                             Icon="/Images/EditTask.png" 
                                    Command="{StaticResource TrimXmlCommand}" 
                                    CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"/>
                            <fluent:MenuItem
                                Header="Bulk"
                                ToolTip="Prettyprints multiple files"
                                Icon="/Images/Prettyprint_16x16.png"
                                Click="mnuBulkPrettyPrint_Click"
                            />
                        </fluent:SplitButton.Items>
                    </fluent:SplitButton>
                    
                    <fluent:Button
                        Header="Insert current date"
                        SizeDefinition="Middle, Small"
                        ToolTip="Inserts the current date and time in a format compatible to ISO 8601 which is as well compatible to xs:dateTime"
                        Icon="/Images/Clock_16x16.png" 
                        Command="{StaticResource InsertCurrentDateTimeCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"                        
                    />
                    <fluent:Button
                        Header="Export highlighting"
                        ToolTip="Exports the code highlighting as HTML file"
                        Icon="/Images/Forecolor.png" 
                        SizeDefinition="Middle, Small"
                        Command="{StaticResource ExportAsHtmlCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                    />
                    <fluent:SplitButton Header="(Un)escape XML"
                            SizeDefinition="Middle, Small"
                            Command="{StaticResource UnescapeXmlStringCommand}" 
                            CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}">
                        <fluent:SplitButton.Items>
                            <fluent:MenuItem Header="Unescape XML"
                                Command="{StaticResource UnescapeXmlStringCommand}" 
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"/>
                            <fluent:MenuItem Header="Escape XML"
                                Command="{StaticResource EscapeXmlStringCommand}" 
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"/>
                            <Separator />
                            <fluent:MenuItem Header="Unescape C# string" 
                                Command="{StaticResource UnescapeCsStringCommand}" 
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"/>
                            <Separator />
                            <fluent:MenuItem Header="Unescape Base64"
                                Command="{StaticResource UnescapeBase64StringCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"/>
                            <fluent:MenuItem Header="Escape Base64"
                                Command="{StaticResource EscapeBase64StringCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"/>
                            <Separator />
                            <fluent:MenuItem Header="Numbers: decimal to hex"
                                Command="{StaticResource Dec2HexCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"/>
                            <fluent:MenuItem Header="Numbers: Hex to decimal"
                                Command="{StaticResource Hex2DecCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"/>
                        </fluent:SplitButton.Items>
                    </fluent:SplitButton>

                    <fluent:SplitButton Header="Insert XML entity"
                            SizeDefinition="Middle, Small">
                        <fluent:SplitButton.Items>
                            <fluent:MenuItem Header="quot" Click="insertEntity_OnClick"
                                             Icon="/Images/entities/quot.png" 
                                             SizeDefinition="Middle, Small"/>
                            <fluent:MenuItem Header="amp" Click="insertEntity_OnClick"
                                             Icon="/Images/entities/amp.png" 
                                             SizeDefinition="Middle, Small"/>
                            <fluent:MenuItem Header="apos" Click="insertEntity_OnClick"
                                             Icon="/Images/entities/apos.png" 
                                             SizeDefinition="Middle, Small"/>
                            <fluent:MenuItem Header="lt" Click="insertEntity_OnClick"
                                             Icon="/Images/entities/lt.png" 
                                             SizeDefinition="Middle, Small"/>
                            <fluent:MenuItem Header="gt" Click="insertEntity_OnClick"
                                             Icon="/Images/entities/gt.png" 
                                             SizeDefinition="Middle, Small"/>
                        </fluent:SplitButton.Items>
                    </fluent:SplitButton>
                    
                </fluent:RibbonGroupBox>
            </fluent:RibbonTabItem>

            <Ribbon:ValidationTab />

            <fluent:RibbonTabItem Header="XSD" x:Name="tabXsd">
                <fluent:RibbonGroupBox Header="Style">
                    <fluent:Button 
                        Header="Zoom In"
                        Icon="/Images/ZoomIn_16x16.png"
                        LargeIcon="/Images/ZoomIn_32x32.png" 
                        Command="{StaticResource XsdVizFontPlusCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                    />
                    <fluent:Button 
                        Header="Zoom Out"
                        Icon="/Images/ZoomOut_16x16.png" 
                        LargeIcon="/Images/ZoomOut_32x32.png" 
                        Command="{StaticResource XsdVizFontMinusCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                    />
                </fluent:RibbonGroupBox>

                <fluent:RibbonGroupBox Header="Show">
                    <fluent:Button 
                        Header="Show root"
                        Icon="/Images/HomeHS.png"
                        SizeDefinition="Middle, Small"
                        Command="{StaticResource XsdVizShowRootCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                    />
                    <fluent:Button 
                        Header="Back"
                        Icon="/Images/Back.png" 
                        SizeDefinition="Middle, Small"
                        Command="{StaticResource XsdVizHistoryBackCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                    />
                    <fluent:Button 
                        Header="Unhide all"
                        Icon="/Images/RepeatHS.png"
                        SizeDefinition="Middle, Small"
                        Command="{StaticResource XsdVizUnhideAllCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                    />
                </fluent:RibbonGroupBox>

                <fluent:RibbonGroupBox Header="Elements">
                    <fluent:ToggleButton 
                        Header="Expand refs"
                        SizeDefinition="Middle, Small"
                        Command="{StaticResource XsdVizEnabledCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                        IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data.XsdVisualizerData.ExpandRefs}"
                    />
                    <fluent:ToggleButton 
                        Header="Expand types"
                        SizeDefinition="Middle, Small"
                        Command="{StaticResource XsdVizEnabledCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                        IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data.XsdVisualizerData.ExpandTypes}"
                    />
                    <fluent:ToggleButton 
                        Header="Expand includes"
                        SizeDefinition="Middle, Small"
                        Command="{StaticResource XsdVizEnabledCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                        IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data.XsdVisualizerData.ExpandIncludes}"
                    />
                    <fluent:ToggleButton 
                        Header="Hide types"
                        SizeDefinition="Middle, Small"
                        Command="{StaticResource XsdVizEnabledCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                        IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data.XsdVisualizerData.HideTypes}"
                    />
                    <fluent:ToggleButton 
                        Header="Hide includes"
                        SizeDefinition="Middle, Small"
                        Command="{StaticResource XsdVizEnabledCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                        IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data.XsdVisualizerData.HideIncludes}"
                    />
                </fluent:RibbonGroupBox>

                <fluent:RibbonGroupBox Header="View">
                    <fluent:Button Header="Copy" 
                        Icon="/Images/Copy.png" 
                        SizeDefinition="Middle, Small"
                        Command="{StaticResource XsdVizCopyToClipboardCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                    />
                    <fluent:Button 
                        Header="Export"
                        Icon="/Images/NewCardHS.png" 
                        SizeDefinition="Middle, Small"
                        Command="{StaticResource XsdVizExportCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                    />
                </fluent:RibbonGroupBox>

                <fluent:RibbonGroupBox Header="Tools">
                    <fluent:Button 
                        Header="Generate sample" 
                        LargeIcon="/Images/Generate_XML_32x32.png" 
                        Command="{StaticResource Xsd2XmlGeneratorCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}" 
                    />
                    <fluent:Button
                        Header="Validate xml file"
                        Icon="/Images/112_Tick_Green_16x16.png"
                        LargeIcon="/Images/112_Tick_Green_32x32_72.png"
                        Command="{StaticResource XsdValidateXmlCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}" 
                    />
                </fluent:RibbonGroupBox>
            </fluent:RibbonTabItem>

            <fluent:RibbonTabItem Header="Grid" Group="{Binding ElementName=contextribGrid}" >
                <!-- Ribbon Tab Content -->
            </fluent:RibbonTabItem>

            <treeViewRibbon:TreeViewTab x:Name="ribbonTabTreeView" Group="{Binding ElementName=contextribTree}" />

            <Ribbon1:XsltTab />

            <fluent:RibbonTabItem Header="Tools">
                <fluent:RibbonGroupBox Header="Tools">
                    <fluent:Button
                        Header="Generate by pattern"
                        LargeIcon="/Images/Generate_XML_32x32.png"
                        Click="mnuXmlGenerator_Click" />

                    <fluent:Button
                        Header="Compare XML files"
                        LargeIcon="/Images/compareversionsHS.png"
                        Click="mnuDiff_Click"
                    />
                    <fluent:Button
                        Header="XQuery"
                        LargeIcon="/Images/XQ_32x32.png"
                        Command="{StaticResource StartXQueryCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type fluent:RibbonWindow}}, Path=Data}"
                    />
                </fluent:RibbonGroupBox>
                <fluent:RibbonGroupBox Header="External" x:Name="_ribbongroupExternalTools" x:FieldModifier="private">
                </fluent:RibbonGroupBox>
            </fluent:RibbonTabItem>

            <fluent:Ribbon.ContextualGroups>
                <fluent:RibbonContextualTabGroup x:Name="contextribGrid" Header="Grid View" />
                <fluent:RibbonContextualTabGroup x:Name="contextribTree" Header="Tree View" />
            </fluent:Ribbon.ContextualGroups>
        </fluent:Ribbon>

        <Border DockPanel.Dock="Top" Height="7" BorderBrush="Black" BorderThickness="0,1,0,0">
            <Border.Effect>
                <DropShadowEffect Direction="270" ShadowDepth="1" />
            </Border.Effect>
        </Border>

        <fluent:StatusBar DockPanel.Dock="Bottom" Height="23">
<!--            Background="{DynamicResource CaptionButtonHoverInnerBackgroundBrush}" Style="{DynamicResource StatusBarStyle1}"-->
            <fluent:StatusBarItem Value="150" HorizontalAlignment="Left" VerticalAlignment="Center">
                <TextBlock x:Name="_lblCurrentFileName" x:FieldModifier="private" />
            </fluent:StatusBarItem>
        </fluent:StatusBar>

        <ContentPresenter x:Name="_tabCtrl" x:FieldModifier="private" Drop="_tabCtrl_OnDrop"/>
        
    </DockPanel>
</fluent:RibbonWindow>
